package com.example.programexpert

import android.content.Context

class ProgramExpert(private val context: Context) {
    fun getLanguage(feature: String): String {
        // 把中文特征转成资源名：如“基础” -> "lang_基础"
        val entryName = "lang_$feature"
        val id = context.resources.getIdentifier(
            entryName, "string", context.packageName
        )
        // 找不到就返回 unknown
        return if (id == 0) "unknown" else context.getString(id)
    }
}